<template>
  <div class="tx-block">
    <div class="tx-block--title" v-if="title">{{title}}</div>
    <div class="tx-block--content">
      <slot />
    </div>
  </div>
</template>

<script>
export default { 
  props: ['title']
}
</script>

<style lang="scss" scoped>
@import "../../../style/variables.scss";
.tx-block {
  width: 100%;
  // border: 1px solid rgb(61 126 165 / 50%);
  // box-shadow: inset 0px 0px 5px #1d5a8f;
  padding:20px;
  box-sizing: border-box;
  &--title {
    position: relative;
    padding: 15px;
    font-size: 20px;

    &:before {
      position: absolute;
      content: "";
      left: 0;
      top: 50%;
      height: 18px;
      width: 4px;
      transform: translateY(-50%);
      background-color: $tx-color-primary;
    }
  }

  &--content {
    padding: 10px 0;
  }
}
</style>